package com.demo.service.impl;

import com.demo.dao.SalaryDAO;
import com.demo.dao.impl.SalaryDAOImpl;
import com.demo.service.SalaryService;
import com.demo.bean.Salary;

import java.io.Serializable;
import java.util.Map;

/**
 * Salary模块的Service层（业务层）的具体实现类，对SalaryService接口中定义的抽象方法作出具体的功能实现
 */
public class SalaryServiceImpl implements SalaryService {
    //@Override
    public void add(Salary vo) {
        SalaryDAO salaryDAO = new SalaryDAOImpl();
        salaryDAO.add(vo);
    }

    //@Override
    public void delete(long id) {
        SalaryDAO salaryDAO = new SalaryDAOImpl();
        salaryDAO.delete(id);
    }

    //@Override
    public void update(Salary vo) {
        SalaryDAO salaryDAO = new SalaryDAOImpl();
        salaryDAO.update(vo);
    }

    //@Override
    public Salary get(Serializable id) {
        SalaryDAO salaryDAO = new SalaryDAOImpl();
        return salaryDAO.get(id);
    }

    //@Override
    public Map<String, Object> list(Map<String, Object> params) {
        SalaryDAO salaryDAO = new SalaryDAOImpl();
        return salaryDAO.list(params);
    }
}
